import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-filesys/cooperation/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (params) => {
  return request({
    url: '/api/blade-filesys/cooperation/detail',
    method: 'get',
    params: {
      ...params,
    }
  })
}
export const info = (params) => {
  return request({
    url: '/api/blade-filesys/cooperation/info',
    method: 'get',
    params: {
      ...params,
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/blade-filesys/cooperation/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/blade-filesys/cooperation/submit',
    method: 'post',
    data: row
  })
}


export const update = (row) => {
  return request({
    url: '/api/blade-filesys/cooperation/submit',
    method: 'post',
    data: row
  })
}

export const valueGet = (filePath) => {
  return request({
    url: '/api/blade-filesys/fileops/value',
    method: 'get',
    params: {
      filePath,
    }
  })
}

export const fileCooperationForEdit = (fileId) => {
  return request({
    url: '/api/blade-filesys/feature/fileCooperationForEdit',
    method: 'post',
    params: {
      fileId,
    }
  })
}
export const fileCooperationForSave = (fileId,value,version) => {
  return request({
    url: '/api/blade-filesys/feature/fileCooperationForSave',
    method: 'post',
    params: {
      fileId,
      value,
      version,
    }
  })
}
export const userinfo = (fileId) => {
  return request({
    url: '/api/blade-filesys/feature/userinfo',
    method: 'get',
    params: {
      fileId,
    }
  })
}
